package com.example.farmer.Entity;

import com.example.farmer.R;
import com.example.farmer.utils.DateUtils;

import java.util.ArrayList;
import java.util.List;

public class DataService {

    /**
     * 模拟提供数据
     *
     * @param position
     * @return
     */

    public static List<ProductInfo> getListData(int position) {
        List<ProductInfo> list = new ArrayList<>();

        if (position == 0) {
            list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景1", "my beautify scenery1", 38, DateUtils.nowTime()));
            list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景2", "my beautify scenery2", 28, DateUtils.nowTime()));
        } else if (position == 1) {
            list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景3", "my beautify scenery3", 78, DateUtils.nowTime()));
            list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景4", "my beautify scenery4", 88, DateUtils.nowTime()));
        } else if (position == 2) {
            list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景5", "my beautify scenery5", 98, DateUtils.nowTime()));
            list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景6", "my beautify scenery6", 48, DateUtils.nowTime()));
        } else if (position == 3) {
            list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景7", "my beautify scenery7", 38, DateUtils.nowTime()));
            list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景8", "my beautify scenery8", 28, DateUtils.nowTime()));
        } else if (position == 4) {
            list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景9", "my beautify scenery9", 18, DateUtils.nowTime()));
            list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景0", "my beautify scenery0", 80, DateUtils.nowTime()));
        } else {
            list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景10", "my beautify scenery10", 18, DateUtils.nowTime()));
            list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景11", "my beautify scenery11", 80, DateUtils.nowTime()));
        }


        return list;
    }

    public static List<ProductInfo> getListDatas() {
        List<ProductInfo> list = new ArrayList<>();
        list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景1", "my beautify scenery1", 38, DateUtils.nowTime()));
        list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景2", "my beautify scenery2", 28, DateUtils.nowTime()));
        list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景3", "my beautify scenery3", 78, DateUtils.nowTime()));
        list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景4", "my beautify scenery4", 88, DateUtils.nowTime()));
        list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景5", "my beautify scenery5", 98, DateUtils.nowTime()));
        list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景6", "my beautify scenery6", 48, DateUtils.nowTime()));
        list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景7", "my beautify scenery7", 38, DateUtils.nowTime()));
        list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景8", "my beautify scenery8", 28, DateUtils.nowTime()));
        list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景9", "my beautify scenery9", 18, DateUtils.nowTime()));
        list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景0", "my beautify scenery0", 80, DateUtils.nowTime()));
        list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景10", "my beautify scenery10", 18, DateUtils.nowTime()));
        list.add(new ProductInfo(0, R.drawable.img_scenery_2, "风景11", "my beautify scenery11", 80, DateUtils.nowTime()));
        return list;
    }
}